package com.iemes.controller.pretest;


import java.util.List;
import java.util.Map;
import javax.inject.Inject;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.iemes.controller.index.BaseController;
import com.iemes.entity.PretesFeedDetailFormMap;
import com.iemes.entity.PretesMaterialCuringFormMap;
import com.iemes.entity.PretestDentsityFormMap;
import com.iemes.mapper.pretest.PreFeedDetailMapper;
import com.iemes.mapper.pretest.PretesDentsityMapper;
import com.iemes.plugin.PageView;
import com.iemes.util.Common;

//送料明细
@RequestMapping("/prefeed")
@Controller
public class PreFeedDetailController extends BaseController {


	@Inject
	private PreFeedDetailMapper preFeedDetailMapper;

	
//  密度
	@Inject
	private PretesDentsityMapper pretestDentsityMapper;
	
		@RequestMapping("feeddetail")
		public String feeddetail(Model model){
		model.addAttribute("res", findByRes());
		model.addAttribute("dentsity", pretestDentsityMapper.findByWhere(getFormMap(PretestDentsityFormMap.class)));
		return Common.BACKGROUND_PATH + "/pretest/prefeeddetail/prefeeddetail_list";
	}
	
	@ResponseBody
	@RequestMapping("prefeeddetail_findByPage")
	public PageView findByPage(String pageNow, String pageSize) throws Exception
	{
		PretesFeedDetailFormMap feeddetailFormMap = getFormMap(PretesFeedDetailFormMap.class);
		List<Map<String, Object>> pretest = preFeedDetailMapper.getAll(feeddetailFormMap);
		
		LuogicPaging(pageNow, pageSize, pretest);
		pageView.setRecords(pretest);
		return pageView;
	}
	

	
	
}











